package com.qdlc.p2p.biz.core.tender;

import java.util.List;

import com.qdlc.p2p.common.core.ReturnResult;
import com.qdlc.p2p.dal.dto.TppTradeLog;
import com.qdlc.p2p.dal.dto.User;
import com.qdlc.p2p.dal.model.BorrowModel;

/**
 * 投标策略
 *
 * @author wuaj
 */
public interface IBorrowStrategy {

    int getStrategyType();

    /**
     * 生成投标订单
     *
     * @param borrowModel 标
     * @param tenderUser 投标用户
     * */
    TppTradeLog createTenderOrder(BorrowModel borrowModel, User tenderUser);

    /**
     * 投标
     *
     * @param tppTradeLog 订单Log
     * @param tenderUser 投标用户
     * */
    ReturnResult tender(TppTradeLog tppTradeLog, User tenderUser);

    /**
     * 投标
     *
     * @param borrowModel 标
     * @param tenderUser 投标用户
     * */
    void tender(BorrowModel borrowModel, User tenderUser);

    /**
     * 满标复审通过-生成放款订单
     *
     * @author Kaiju Zhao
     * @param borrowModel 借款标
     * @return 新订单
     */
    TppTradeLog createLoanPayOrder(BorrowModel borrowModel);


    /**
     * 满标复审不通过-创建退款订单列表
     *
     * @author Kaiju Zhao
     * @param borrowModel 借款标
     * @return 新订单
     */
    List<TppTradeLog> createRefundCollectOrder(BorrowModel borrowModel);

    /**
     * 满标复审通过
     *
     * @author Kaiju Zhao
     * @param tppTradeLog 订单交易记录
     */
    ReturnResult verifyFullSuccess(TppTradeLog tppTradeLog);

    /**
     * 满标复审通过
     *
     * @author Kaiju Zhao
     * @param borrowModel 借款标
     */
    void verifyFullSuccess(BorrowModel borrowModel);

    /**
     * 满标复审不通过
     *
     * @author Kaiju Zhao
     * @param tppTradeLogList 订单交易记录列表
     */
    ReturnResult verifyFullFail(List<TppTradeLog> tppTradeLogList);

    /**
     * 满标复审不通过
     *
     * @author Kaiju Zhao
     * @param borrowModel 借款标
     */
    void verifyFullFail(BorrowModel borrowModel);

    /**
     * 撤销标
     *
     * @author Kaiju Zhao
     * @param tppTradeLogList 订单交易记录列表
     */
    ReturnResult cancelBorrow(List<TppTradeLog> tppTradeLogList);

}
